﻿@{
    Layout = "~/Themes/CNet/Shared/_HomePage_Master.cshtml";
    //current category ID
    int currentCategoryId = 1;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }


    //current manufacturer ID
    int currentManufacturerId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("manufacturer", StringComparison.InvariantCultureIgnoreCase))
    {
        currentManufacturerId = Convert.ToInt32(Url.RequestContext.RouteData.Values["manufacturerId"].ToString());
    }


    //current product ID
    int currentProductId = 0;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("product", StringComparison.InvariantCultureIgnoreCase))
    {
        currentProductId = Convert.ToInt32(Url.RequestContext.RouteData.Values["productId"].ToString());
    }


    //currentHot category ID
    int currentHotCategoryId = 21;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentHotCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }

    //currentNew category ID
    int currentNewCategoryId = 20;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentNewCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }

    //currentPage category ID
    int currentPageCategoryId = 19;
    if (Url.RequestContext.RouteData.Values["controller"].ToString().Equals("catalog", StringComparison.InvariantCultureIgnoreCase) &&
        Url.RequestContext.RouteData.Values["action"].ToString().Equals("category", StringComparison.InvariantCultureIgnoreCase))
    {
        currentPageCategoryId = Convert.ToInt32(Url.RequestContext.RouteData.Values["categoryId"].ToString());
    }
}
<script type="text/javascript">

    $(function () {
        if (window.ActiveXObject) {
            var ua = navigator.userAgent.toLowerCase();
            var ie = ua.match(/msie ([\d.]+)/)[1]
            if (ie == 6.0) {
                alert("您的浏览器版本过低，在本系统中不能达到良好的视觉效果，建议你升级到ie8以上！");
            }
        }
        //猜你喜欢和最热购买切换
        $("#promoteTitle a").mouseover(function () {
            var myIndex = $(this).attr("index");
            $(this).addClass("ahover").siblings().removeClass("ahover");
            $("div[index=" + myIndex + "]").show().siblings().hide();
            return false;
        });

        //猜你喜欢和最热购买切换
        $("#promoteTitle a").mouseover(function () {
            var myIndex = $(this).attr("index");
            $(this).addClass("ahover").siblings().removeClass("ahover");
            $("div[index=" + myIndex + "]").show().siblings().hide();
            return false;
        });
    });
</script>

<div class="major_screen_wrap">
    <div class="major_screen">
        <div class="col_side">
            <div class="col_side">
            <div id="cuisine" class="side_menu">
             @Html.Action("CategoryNavigationNew", "Catalog", new { currentCategoryId = currentCategoryId, currentProductId = currentProductId })
             <div class="side_menu_bottom"></div>
            </div>
            </div>
        </div>
        <div class="sliding_banner">
             @Html.Action("Top_Advert","Advert")
        </div>
        <div class="tehui">
            <div class="tehui_title">
                每天特价一款</div>
            <div class="tehui_pr"  >
                @Html.Action("Daily_Specials", "Advert")
            </div>
        </div>
        <div class="ms_tab">
            <div class="ms_tab_hd" id="promoteTitle">
                <a index="0" href="#" class="ahover">猜你喜欢</a> <a class="" index="1" href="#">最热购买</a>
            </div>
            <div class="ms_tab_bd">
                <div class="item mod_goods_list_wrap" index="0" >
                    @Html.Action("GuessLike", "Catalog")
                </div>
                <div class="item mod_goods_list_wrap" index="1" style="display: none">
                    @Html.Action("HotBuy", "Catalog")
                </div>
            </div>
        </div>
    </div>
</div>
<div class="ms_mod_pr">
    <div class="mod_baoyou">
        <div class="mod_baoyou_title">
            <b>套餐推荐-</b><span>每天更新数据，为此我们整天吃外卖</span>
        </div>
        <div class="mod_baoyou_pr">
        @Html.Action("RecommenadCombo", "Catalog")
        </div>
        @Html.Action("CuisineRecommend", "Catalog")
    </div>
</div>
